package com.zhuoan.im.webapp.biz;

import com.zhuoan.im.webapp.dao.model.UserGroup;
import org.jim.common.packets.Group;

import java.util.List;

/**
 * UserGroupBiz
 *
 * @author weixiang.wu
 * @date 2018 -10-15 17:03
 */
public interface UserGroupBiz {
    /**
     * Query user group by creator user id list.
     *
     * @param id the id
     * @return the list
     */
    List<UserGroup> queryUserGroupByCreatorUserId(Long id);

    /**
     * Insert selective int.
     *
     * @param record the record
     * @return the int
     */
    int insertSelective(UserGroup record);

    /**
     * Query group by creator user id and type user group.
     *
     * @param creatorUserId the creator user id
     * @param myFriends     the my friends
     * @return the user group
     */
    UserGroup queryGroupByCreatorUserIdAndType(Long creatorUserId, Integer myFriends);

    /**
     * 根据群组id, 获取当前群组及组内所有用户的信息
     *
     * @param groupId the group id
     * @return the list
     */
    Group queryGroupAndInnerUserInfoByGroupId(Long groupId);

}
